]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Config: use sed for substituting variables
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 11 Feb 2012 17:44:35 +0000 (18:44 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Tue, 14 Feb 2012 18:13:02 +0000 (19:13 +0100)
Substitutions generated by configure don't resolve prefixes, so
cannot be used for paths. Config already had localedir, and next
commit will need libexecdir and sysconfdir, so just bite the bullet
and move to sed.

https://bugzilla.gnome.org/show_bug.cgi?id=658484

configure.ac
js/Makefile.am
js/misc/config.js.in

index 272dbf26cd3e1b1ef1c8d47e52c06b813f2ae099..cacf35a42337a1bafe62a3fb0c0632747d66cf12 100644 (file)
@@ -275,7 +275,6 @@ AC_CONFIG_FILES([
   docs/reference/st/Makefile
   docs/reference/st/st-docs.sgml
   js/Makefile
-  js/misc/config.js
   src/Makefile
   browser-plugin/Makefile
   tests/Makefile
index 14a25b599913fd46363d602003f5258afd61611a..f3413ba1b93f221bf3d96eddf471466c5783afad 100644 (file)
@@ -1,4 +1,18 @@
 
+EXTRA_DIST = misc/config.js.in
+
+misc/config.js: misc/config.js.in Makefile
+       sed -e "s|[@]PACKAGE_NAME@|$(PACKAGE_NAME)|g" \
+           -e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
+           -e "s|[@]GJS_VERSION@|$(GJS_VERSION)|g" \
+           -e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
+           -e "s|[@]SHELL_SYSTEM_CA_FILE@|$(SHELL_SYSTEM_CA_FILE)|g" \
+           -e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
+           -e "s|[@]datadir@|$(datadir)|g" \
+           -e "s|[@]libexecdir@|$(libexecdir)|g" \
+           -e "s|[@]sysconfdir@|$(sysconfdir)|g" \
+               $< > $@
+
 jsdir = $(pkgdatadir)/js
 
 nobase_dist_js_DATA =  \
index 6cbf9324d98f932b25c6a19e5cfd9199a80e0fe2..4a0db16a4ee3f3e16245dd5a23701579781df755 100644 (file)
@@ -14,3 +14,6 @@ const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
 const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@';
 /* locale dir */
 const LOCALEDIR = '@datadir@/locale';
+/* other standard directories */
+const LIBEXECDIR = '@libexecdir@';
+const SYSCONFDIR = '@sysconfdir@';